
<%@ page import="org.ikastola.Fee" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'fee.label', default: 'Fee')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-fee" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="fee.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-fee" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list fee">
			
				<g:if test="${feeInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="fee.name.label" default="Name" /></span>
					
						<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${feeInstance}" field="name"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${feeInstance?.value}">
				<li class="fieldcontain">
					<span id="value-label" class="property-label"><g:message code="fee.value.label" default="Value" /></span>
					
						<span class="property-value" aria-labelledby="value-label"><g:fieldValue bean="${feeInstance}" field="value"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${feeInstance?.description}">
				<li class="fieldcontain">
					<span id="description-label" class="property-label"><g:message code="fee.description.label" default="Description" /></span>
					
						<span class="property-value" aria-labelledby="description-label"><g:fieldValue bean="${feeInstance}" field="description"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${feeInstance?.period}">
				<li class="fieldcontain">
					<span id="period-label" class="property-label"><g:message code="fee.period.label" default="Period" /></span>
					
						<span class="property-value" aria-labelledby="period-label">
						<g:if test="${feeInstance?.period == '1'}"><g:message code="fee.period.1" /></g:if>
						<g:else><g:message code="fee.period.2" /></g:else>
						</span>
					
				</li>
				</g:if>
			
				<g:if test="${feeInstance?.dueday}">
				<li class="fieldcontain">
					<span id="dueday-label" class="property-label"><g:message code="fee.dueday.label" default="Dueday" /></span>
					
						<span class="property-value" aria-labelledby="dueday-label"><g:fieldValue bean="${feeInstance}" field="dueday"/></span>
					
				</li>
				</g:if>
			
			</ol>
			
			<g:if test="${feeInstance.feeDetails}">
				<table>
					<thead>
						<tr>
							<th>Nombre</th>
							<th>Monto</th>
							<th>Descripci&oacute;n</th>
						</tr>
					</thead>
					<tbody>
					<g:each in="${feeInstance.feeDetails}" status="i" var="feedet">
						<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
						
							<td><g:link controller="feeDetail" action="show" id="${feedet.id}">${fieldValue(bean: feedet, field: "name")}</g:link></td>
						
							<td>${fieldValue(bean: feedet, field: "value")}</td>
						
							<td>${fieldValue(bean: feedet, field: "description")}</td>
					
						</tr>
					</g:each>
					</tbody>
				</table>
			</g:if>
						
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${feeInstance?.id}" />
<%--					<g:link class="edit" action="edit" id="${feeInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>--%>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
